<?php
/**
 *  На входе POST
 * 
Array
(
    [id] => id нужной новости
)
*/
$news = loadmodule('news');
$news = new news();
$getsnews = $news->getById($_POST['id']);
# json для совмместимости с 4 php
include_once(engine.'/php4/json.php');
$getsnews['act']=($getsnews['act'])?'true':'false';
$response=array(
	"success"=>true,
	"data"=>array(
		"id"=>$getsnews["id"],
		"title"=>$getsnews["title"],
		"date"=>date('m/d/Y',strtotime($getsnews['date'])),
		"act"=>($getsnews['act'])?'true':'false',
		"anons"=>$getsnews['anons'],
		"text"=>$getsnews['text'],
	)
);
echo json_encode($response);
?>